<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@page import="karaoke.modelo.JsonResult,karaoke.modelo.Administrador"%>    
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<title>Karaoke.pe</title>
	
	<%@include file="scripts.jsp" %>
	<script src="../js/validation.js"></script>
	<script type="text/javascript" language="javascript" src="../js/scriptscustomize.js"></script>
</head>
<body class="preview" id="top">
	<%
	HttpSession sesion = request.getSession();
	Administrador admi = (Administrador)sesion.getAttribute("ADMINISTRADOR");
	
	if(admi!=null){
		response.sendRedirect("productos.jsp");
	}
	%>
	<%@include file="header.jsp" %>

    <div class="container">
    
		<div class="row-fluid">
			<div class="page-header">
		  		<h1>Karaoke.pe</h1>
			</div>
	      	<div class="span6 offset3">
	      		<form class="form-horizontal well" action="LoginAdminServlet" method="post">
	      			<legend>Administrador</legend>
	      			
	      			<%
	      			JsonResult mensaje = (JsonResult)request.getAttribute("MESSAGES");
	      			
	      			if(mensaje!=null){
	      			%>
	      			<div class="alert <%= mensaje.getClaseMsg() %>" id="msg_loginalert">
				        <a class="close">×</a>
				        <%= mensaje.getMensaje() %>
				      </div>
				    <% 
	      			}
				    %>  
	      			<fieldset>
		      			<div class="control-group">
						  <label class="control-label" for="txdni">D.N.I&nbsp;:</label>
						  <div class="controls">
						  	<div class="input-prepend">
							  	<span class="add-on"><i class="icon-user"></i></span>
							    <input name="txtdni" type="text" class="input-xlarge" id="txdni" placeholder="Nro.Documento" maxlength="8" onkeypress="return validarNumeros(event);" required>
							    
						    </div>
						  </div>
						</div>
						<div class="control-group">
						  <label class="control-label" for="txpass">Contraseña&nbsp;:</label>
						  <div class="controls">
						  	<div class="input-prepend">
						  		<span class="add-on"><i class="icon-lock"></i></span>
							    <input name="txtpassword" type="password" class="input-xlarge" id="txpass" placeholder="Password" required>
							    <!-- <p class="help-block">Error Message</p> -->
							    <!-- <span class="help-inline">Please correct the error</span> -->
						    </div>
						  </div>
						</div>
						<div class="form-actions">
						  <button type="submit" class="btn btn-primary">Ingresar</button>
						</div>
					</fieldset>
	      		</form>
	      	</div>
		</div>
      
      

	  <%@include file="footer.jsp" %>

    </div> <!-- /container -->

    <%@include file="lejavascript.jsp" %>
	
</body>
</html>